\defmodule{UserRecord}

This class represents a record object to store 
information related to the request of a process for a
\class{Resource} or for \class{Bin} tokens, 
or when a process waits for a \class{Condition}.
A \class{UserRecord} is created for each process request.
The record contains the number of units requested 
or used, the associated process, and the
simulation time when the request was made.
Lists of processes waiting for a \class{Resource},
\class{Bin}, or \class{Condition}, for example, contain
\class{UserRecord} objects.


\bigskip\hrule

\begin{code}
\begin{hide}
/*
 * Class:        UserRecord
 * Description:  A record object to store information related to the request
                 of a process for a Resource or for Bin tokens, or when a 
                 process waits for a Condition.
 * Environment:  Java
 * Software:     SSJ 
 * Copyright (C) 2001  Pierre L'Ecuyer and Universite de Montreal
 * Organization: DIRO, Universite de Montreal
 * @author       
 * @since

 * SSJ is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License (GPL) as published by the
 * Free Software Foundation, either version 3 of the License, or
 * any later version.

 * SSJ is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * A copy of the GNU General Public License is available at
   <a href="http://www.gnu.org/licenses">GPL licence site</a>.
 */
\end{hide}
package umontreal.iro.lecuyer.simprocs;\begin{hide}

import umontreal.iro.lecuyer.simprocs.SimProcess;
\end{hide}

public class UserRecord \begin{hide} {
   // Nb. of units taken for this record.
   protected int numUnits;

   // Process associated to the record
   protected SimProcess process;

   // Priority of this process.
   // protected double priority;

   // Time of the record creation
   protected double requestTime;

   // Constructor.
   // We do not want the user to construct such objects.
   protected UserRecord (int n, SimProcess p, double requestTime) {
      numUnits = n;
      process = p;
      this.requestTime = requestTime;
   }\end{hide}

   public int getNumUnits()\begin{hide} {
      return numUnits;
   }\end{hide}
\end{code}
\begin{tabb}   Returns the number of units requested or used
   by the associated process.
\end{tabb}
\begin{htmlonly}
   \return{the number of requested or used units}
\end{htmlonly}
\begin{code}

   public SimProcess getProcess()\begin{hide} {
      return process;
   }\end{hide}
\end{code}
\begin{tabb}   Returns the process object associated with this record.
%   This is the process that created the record.  
\end{tabb}
\begin{htmlonly}
   \return{the process associated to this record}
\end{htmlonly}
\begin{code}

   public double getRequestTime()\begin{hide} {
      return requestTime;
   }
}\end{hide}
\end{code}
\begin{tabb}   Returns the time of creation of this record.  
\end{tabb}
\begin{htmlonly}
   \return{the simulation time of the record creation}
\end{htmlonly}
